/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.book.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * book_category 书籍分类表Entity
 * @author 逗你玩
 * @version 2019-07-21
 */
@Table(name="all_book", alias="a", columns={
		@Column(name="id", attrName="id", label="ID", isPK=true),
		@Column(name="title", attrName="title", label="名称", queryType=QueryType.LIKE),
		@Column(name="image_url", attrName="imageUrl", label="image_url"),
		@Column(name="auther", attrName="auther", label="作者"),
		@Column(name="intro", attrName="intro", label="简介"),
		@Column(name="score", attrName="score", label="评分"),
		@Column(name="reads_number", attrName="readsNumber", label="阅读人数"),
		@Column(name="category", attrName="category.id", label="类别"),
		@Column(name="downloadurl", attrName="downloadurl", label="downloadurl"),
	}, orderBy="a.id ASC"
)
public class AllBook extends DataEntity<AllBook> {
	
	private static final long serialVersionUID = 1L;
	private String title;		// 名称
	private String imageUrl;		// image_url
	private String auther;		// 作者
	private String intro;		// 简介
	private String score;		// 评分
	private String readsNumber;		// 阅读人数
	private BookCategory category;		// 类别 父类
	private String downloadurl;		// downloadurl
	
	public AllBook() {
		this(null);
	}


	public AllBook(BookCategory category){
		this.category = category;
	}
	
	@Length(min=0, max=256, message="名称长度不能超过 256 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=0, max=512, message="image_url长度不能超过 512 个字符")
	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}
	
	@Length(min=0, max=256, message="作者长度不能超过 256 个字符")
	public String getAuther() {
		return auther;
	}

	public void setAuther(String auther) {
		this.auther = auther;
	}
	
	@Length(min=0, max=1024, message="简介长度不能超过 1024 个字符")
	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}
	
	@Length(min=0, max=256, message="评分长度不能超过 256 个字符")
	public String getScore() {
		return score;
	}

	public void setScore(String score) {
		this.score = score;
	}
	
	@Length(min=0, max=256, message="阅读人数长度不能超过 256 个字符")
	public String getReadsNumber() {
		return readsNumber;
	}

	public void setReadsNumber(String readsNumber) {
		this.readsNumber = readsNumber;
	}
	
	@Length(min=0, max=256, message="类别长度不能超过 256 个字符")
	public BookCategory getCategory() {
		return category;
	}

	public void setCategory(BookCategory category) {
		this.category = category;
	}
	
	@Length(min=0, max=512, message="downloadurl长度不能超过 512 个字符")
	public String getDownloadurl() {
		return downloadurl;
	}

	public void setDownloadurl(String downloadurl) {
		this.downloadurl = downloadurl;
	}
	
}